#!/usr/bin/make -f
# -*- makefile -*-

%:
	dh $@

override_dh_auto_configure:
	# Skip configure step for no-build package

override_dh_auto_build:
	# Skip build step for no-build package

override_dh_auto_install:
	# Install files directly without compilation
	mkdir -p debian/wifimanager/usr/bin
	mkdir -p debian/wifimanager/usr/share/applications
	mkdir -p debian/wifimanager/usr/share/icons/hicolor/48x48/apps
	mkdir -p debian/wifimanager/usr/share/wifimanager
	
	# Install Python script
	cp src/wifimanager.py debian/wifimanager/usr/share/wifimanager/
	chmod +x debian/wifimanager/usr/share/wifimanager/wifimanager.py
	
	# Create launcher script
	echo '#!/bin/bash' > debian/wifimanager/usr/bin/wifimanager
	echo 'python3 /usr/share/wifimanager/wifimanager.py' >> debian/wifimanager/usr/bin/wifimanager
	chmod +x debian/wifimanager/usr/bin/wifimanager
	
	# Install desktop file
	cp wifimanager.desktop debian/wifimanager/usr/share/applications/
	
	# Install icon if it exists
	if [ -f icons/wifimanager.png ]; then
		cp icons/wifimanager.png debian/wifimanager/usr/share/icons/hicolor/48x48/apps/
	fi

# 如果需要添加自定义命令，在此处添加
